/**
 * 跳一跳圆柱体方块，基于base-block基类
 */

import BaseBlock from './base'

class Cylinder extends BaseBlock {
    constructor(x, y, z) {
        super('cylinder')

        this.x = x
        this.y = y
        this.z = z

        const geometry = new THREE.CylinderGeometry(this.width / 2, this.width / 2, this.height, 120)
        const material = new THREE.MeshBasicMaterial({
            color: 0x8ee999
        })
        this.instance = new THREE.Mesh(geometry, material)
        this.instance.position.x = this.x
        this.instance.position.y = this.y
        this.instance.position.z = this.z
        this.instance.name = 'cylinder'
    }
}

export default Cylinder